/**
 * 公共api
 */
import {
    http
} from '@/api/service.js'

/**
 * 登录
 * @param {text} username 用户名
 * @param {text} password 密码
 */
export const doLogin = (data, params) => {
    return http.middleware({
        method: 'POST', // 必须大写
        url: '/login',
        header: {
            'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
        },
        data: data,
        params: params,
        //是否判断token
        /* custom: {
           auth: true
         } */
    })
}
//请求方法
export const requestInfo = (params) => {
    // console.log(params)
    return http.middleware({
        method: params.method == undefined ? 'POST' : params.method, // 必须大写
        url: params.url,
        header: params.header == undefined ?
            {
                'content-type': 'application/json'
            } : params.header,
        data: params.data,
        params:params.params,
        async: params.async==undefined?true:params.async,
        //是否判断token
        custom: {
            auth: params.auth == undefined ? true : params.auth
        }
    })
}
//接口测试
export const textC = (data, params) => {
    return http.middleware({
        method: 'POST', // 必须大写
        url: '/erp/produce/Shipping/findShippingForView',
        header: {
            'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
        },
        data: data,
        params: params,
        //是否判断token
        custom: {
            auth: true
        }
    })
}
//下拉分页
    export const getAuditStoreLists = (pageDTO) => {
        return http.middleware({
            method: 'POST', // 必须大写
            url: '/erp/produce/Shipping/findShippings',
            //是否判断token
            data:pageDTO,
            custom: {
                auth: true
            }
        })


}







